import { defineComponent } from "vue";

// AI文件图标
const FileIconAI = defineComponent({
  name: "FileIconAI",
  render() {
    return (
      <svg
        class="icon"
        width="200px"
        height="200.00px"
        viewBox="0 0 1024 1024"
        version="1.1"
        xmlns="http://www.w3.org/2000/svg"
      >
        <path
          d="M145.6 0C100.8 0 64 36.8 64 81.6v860.8C64 987.2 100.8 1024 145.6 1024h732.8c43.2 0 80-36.8 80-81.6V324.8L656 0H145.6z"
          fill="#FFC35E"
        />
        <path
          d="M958.4 326.4v16H753.6s-100.8-20.8-97.6-108.8c0 0 3.2 92.8 96 92.8h206.4z"
          fill="#FFB446"
        />
        <path
          d="M656 0v233.6c0 25.6 17.6 92.8 97.6 92.8h204.8L656 0z"
          fill="#FFFFFF"
          opacity=".5"
        />
        <path
          d="M385.6 862.4c-4.8 0-9.6-3.2-11.2-8l-14.4-35.2h-96l-14.4 35.2c-1.6 4.8-6.4 8-11.2 8-6.4 0-12.8-6.4-12.8-12.8 0-1.6 0-3.2 1.6-4.8l65.6-164.8c3.2-8 11.2-12.8 19.2-12.8 9.6 0 16 4.8 19.2 12.8l67.2 164.8v4.8c0 6.4-4.8 12.8-12.8 12.8z m-73.6-168L272 796.8h81.6l-41.6-102.4zM448 862.4c-6.4 0-11.2-4.8-11.2-11.2V678.4c0-6.4 4.8-11.2 12.8-11.2 6.4 0 11.2 4.8 11.2 11.2v172.8c0 6.4-4.8 11.2-12.8 11.2z"
          fill="#FFFFFF"
        />
      </svg>
    );
  }
});

// 音频文件图标
const FileIconAudio = defineComponent({
  name: "FileIconAudio",
  render() {
    return (
      <svg
        class="icon"
        width="200px"
        height="200.00px"
        viewBox="0 0 1024 1024"
        version="1.1"
        xmlns="http://www.w3.org/2000/svg"
      >
        <path
          d="M147.2 0C102.4 0 65.6 36.8 65.6 81.6v860.8c0 44.8 36.8 81.6 81.6 81.6h731.2c44.8 0 81.6-36.8 81.6-81.6V324.8L657.6 0H147.2z"
          fill="#379FD3"
        />
        <path
          d="M960 326.4v16H755.2s-100.8-20.8-97.6-108.8c0 0 3.2 92.8 96 92.8H960z"
          fill="#2987C8"
        />
        <path
          d="M657.6 0v233.6c0 25.6 17.6 92.8 97.6 92.8H960L657.6 0z"
          fill="#FFFFFF"
          opacity=".5"
        />
        <path
          d="M540.8 544l-227.2 30.4v214.4c-11.2-3.2-25.6-4.8-40-1.6-32 6.4-52.8 27.2-46.4 46.4 6.4 20.8 36.8 30.4 68.8 24 28.8-4.8 48-22.4 48-40V646.4l166.4-20.8v132.8c-11.2-3.2-25.6-3.2-40 0-33.6 6.4-54.4 27.2-48 46.4 6.4 19.2 36.8 30.4 70.4 24 28.8-6.4 49.6-24 48-41.6V544z"
          fill="#FFFFFF"
        />
      </svg>
    );
  }
});

// csv文件
const FileIconCsv = defineComponent({
  name: "FileIconCsv",
  render() {
    return (
      <svg
        class="icon"
        width="200px"
        height="200.00px"
        viewBox="0 0 1024 1024"
        version="1.1"
        xmlns="http://www.w3.org/2000/svg"
      >
        <path
          d="M145.6 0C100.8 0 64 36.8 64 81.6v860.8C64 987.2 100.8 1024 145.6 1024h732.8c44.8 0 81.6-36.8 81.6-81.6V324.8L656 0H145.6z"
          fill="#45B058"
        />
        <path
          d="M388.8 691.2c1.6 1.6 3.2 4.8 3.2 8 0 6.4-4.8 11.2-11.2 11.2-3.2 0-6.4 0-8-3.2-11.2-12.8-30.4-22.4-48-22.4-41.6 0-73.6 32-73.6 78.4 0 44.8 32 78.4 73.6 78.4 17.6 0 35.2-8 48-22.4 1.6-1.6 4.8-3.2 8-3.2 6.4 0 11.2 4.8 11.2 11.2 0 3.2-1.6 6.4-3.2 8-14.4 16-35.2 27.2-64 27.2-56 0-99.2-40-99.2-99.2s43.2-99.2 99.2-99.2c28.8 0 49.6 11.2 64 27.2z m108.8 171.2c-28.8 0-51.2-9.6-67.2-24-3.2-1.6-3.2-4.8-3.2-8 0-6.4 3.2-12.8 11.2-12.8 1.6 0 4.8 1.6 6.4 3.2 12.8 11.2 32 20.8 54.4 20.8 33.6 0 44.8-19.2 44.8-33.6 0-49.6-113.6-22.4-113.6-91.2 0-30.4 27.2-52.8 65.6-52.8 24 0 46.4 8 62.4 20.8 1.6 1.6 3.2 4.8 3.2 8 0 6.4-4.8 11.2-11.2 11.2-1.6 0-4.8 0-6.4-1.6-14.4-11.2-32-17.6-49.6-17.6-24 0-40 12.8-40 30.4 0 43.2 113.6 19.2 113.6 91.2 0 27.2-19.2 56-70.4 56z m272-179.2L702.4 848c-3.2 8-9.6 12.8-17.6 12.8h-1.6c-8 0-16-4.8-19.2-12.8l-65.6-164.8c-1.6-1.6-1.6-3.2-1.6-4.8 0-6.4 4.8-12.8 12.8-12.8 4.8 0 9.6 3.2 11.2 8l62.4 160 62.4-160c1.6-4.8 6.4-8 11.2-8 8 0 14.4 6.4 14.4 12.8 0 1.6-1.6 3.2-1.6 4.8z"
          fill="#FFFFFF"
        />
        <path
          d="M960 326.4v16H755.2s-100.8-20.8-97.6-108.8c0 0 3.2 92.8 96 92.8H960z"
          fill="#349C42"
        />
        <path
          d="M657.6 0v233.6c0 25.6 17.6 92.8 97.6 92.8H960L657.6 0z"
          fill="#FFFFFF"
          opacity=".5"
        />
      </svg>
    );
  }
});
// excel文件
const FileIconExcel = defineComponent({
  name: "FileIconExcel",
  render() {
    return (
      <svg
        class="icon"
        width="200px"
        height="200.00px"
        viewBox="0 0 1024 1024"
        version="1.1"
        xmlns="http://www.w3.org/2000/svg"
      >
        <path
          d="M145.6 0C100.8 0 64 36.8 64 81.6v860.8C64 987.2 100.8 1024 145.6 1024h732.8c44.8 0 81.6-36.8 81.6-81.6V324.8L657.6 0h-512z"
          fill="#45B058"
        />
        <path
          d="M374.4 862.4c-3.2 0-6.4-1.6-8-3.2l-59.2-80-60.8 80c-1.6 1.6-4.8 3.2-8 3.2-6.4 0-11.2-4.8-11.2-11.2 0-1.6 0-4.8 1.6-6.4l62.4-81.6-57.6-78.4c-1.6-1.6-3.2-3.2-3.2-6.4 0-4.8 4.8-11.2 11.2-11.2 4.8 0 8 1.6 9.6 4.8l56 73.6 54.4-73.6c1.6-3.2 4.8-4.8 8-4.8 6.4 0 12.8 4.8 12.8 11.2 0 3.2-1.6 4.8-1.6 6.4l-59.2 76.8 62.4 83.2c1.6 1.6 3.2 4.8 3.2 6.4 0 6.4-6.4 11.2-12.8 11.2z m160-1.6H448c-9.6 0-17.6-8-17.6-17.6V678.4c0-6.4 4.8-11.2 12.8-11.2 6.4 0 11.2 4.8 11.2 11.2v161.6h80c6.4 0 11.2 4.8 11.2 9.6 0 6.4-4.8 11.2-11.2 11.2z m112 3.2c-28.8 0-51.2-9.6-67.2-24-3.2-1.6-3.2-4.8-3.2-8 0-6.4 3.2-12.8 11.2-12.8 1.6 0 4.8 1.6 6.4 3.2 12.8 11.2 32 20.8 54.4 20.8 33.6 0 44.8-19.2 44.8-33.6 0-49.6-113.6-22.4-113.6-89.6 0-32 27.2-54.4 65.6-54.4 24 0 46.4 8 60.8 20.8 3.2 1.6 4.8 4.8 4.8 8 0 6.4-4.8 12.8-11.2 12.8-1.6 0-4.8-1.6-6.4-3.2-14.4-11.2-32-16-49.6-16-24 0-40 11.2-40 30.4 0 43.2 113.6 17.6 113.6 89.6 0 27.2-19.2 56-70.4 56z"
          fill="#FFFFFF"
        />
        <path
          d="M960 326.4v16H755.2s-102.4-20.8-99.2-108.8c0 0 3.2 92.8 96 92.8h208z"
          fill="#349C42"
        />
        <path
          d="M656 0v233.6c0 25.6 19.2 92.8 99.2 92.8H960L656 0z"
          fill="#FFFFFF"
          opacity=".5"
        />
      </svg>
    );
  }
});

// exe文件
const FileIconExe = defineComponent({
  name: "FileIconExe",
  render() {
    <svg
      class="icon"
      width="200px"
      height="200.00px"
      viewBox="0 0 1024 1024"
      version="1.1"
      xmlns="http://www.w3.org/2000/svg"
    >
      <path
        d="M145.6 0C100.8 0 64 36.8 64 81.6v860.8C64 987.2 100.8 1024 145.6 1024h732.8c44.8 0 81.6-36.8 81.6-81.6V324.8L657.6 0h-512z"
        fill="#8199AF"
      />
      <path
        d="M960 326.4v16H755.2s-100.8-20.8-99.2-107.2c0 0 3.2 91.2 96 91.2h208z"
        fill="#617F9B"
      />
      <path
        d="M657.6 0v233.6c0 25.6 17.6 92.8 97.6 92.8H960L657.6 0z"
        fill="#FFFFFF"
        opacity=".5"
      />
      <path
        d="M344 862.4h-100.8c-9.6 0-17.6-8-17.6-17.6V688c0-9.6 8-17.6 17.6-17.6h100.8c4.8 0 9.6 4.8 9.6 11.2 0 6.4-4.8 9.6-9.6 9.6h-94.4v62.4h91.2c6.4 0 11.2 4.8 11.2 11.2 0 6.4-4.8 9.6-11.2 9.6h-91.2v67.2h94.4c4.8 0 9.6 4.8 9.6 9.6 0 6.4-4.8 11.2-9.6 11.2z m193.6 1.6c-4.8 0-8 0-9.6-3.2l-59.2-80-60.8 80c-1.6 3.2-4.8 3.2-8 3.2-6.4 0-11.2-4.8-11.2-11.2 0-1.6 0-4.8 1.6-6.4l62.4-81.6-57.6-78.4c-1.6-1.6-3.2-3.2-3.2-6.4 0-4.8 4.8-11.2 12.8-11.2 3.2 0 6.4 1.6 8 4.8l56 73.6 54.4-73.6c1.6-3.2 4.8-4.8 9.6-4.8s11.2 4.8 11.2 11.2c0 3.2 0 4.8-1.6 6.4l-57.6 76.8 60.8 83.2c1.6 1.6 3.2 4.8 3.2 6.4 0 6.4-6.4 11.2-11.2 11.2z m171.2-1.6h-99.2c-9.6 0-17.6-8-17.6-17.6V688c0-9.6 8-17.6 17.6-17.6h99.2c6.4 0 11.2 4.8 11.2 11.2 0 6.4-4.8 9.6-11.2 9.6h-92.8v62.4h91.2c6.4 0 11.2 4.8 11.2 11.2 0 6.4-4.8 9.6-11.2 9.6h-91.2v67.2h92.8c6.4 0 11.2 4.8 11.2 9.6 0 6.4-4.8 11.2-11.2 11.2z"
        fill="#FFFFFF"
      />
    </svg>;
  }
});

// 文件夹
const FileIconFolder = defineComponent({
  name: "FileIconFolder",
  render() {
    return (
      <svg
        class="icon"
        width="200px"
        height="200.00px"
        viewBox="0 0 1024 1024"
        version="1.1"
        xmlns="http://www.w3.org/2000/svg"
      >
        <path
          d="M888 248A72 72 0 0 1 960 320v496a72 72 0 0 1-72 72h-752A72 72 0 0 1 64 816V208a72 72 0 0 1 72-72H320c60.8 0 67.2 19.2 107.2 72 33.6 43.2 115.2 40 166.4 40z"
          fill="#003462"
        />
        <path
          d="M888 289.6H211.2a72 72 0 0 0-72 72v46.4L211.2 304h676.8l72 104v-46.4a72 72 0 0 0-72-72z"
          fill="#87C8F2"
        />
        <path
          d="M137.6 888h750.4A72 72 0 0 0 960 816V376a72 72 0 0 0-72-72H212.8a72 72 0 0 0-73.6 72V816a75.2 75.2 0 0 1 0 11.2 36.8 36.8 0 0 1-73.6 0 72 72 0 0 0 72 60.8z"
          fill="#00A1E0"
        />
      </svg>
    );
  }
});

// 代码文件
const FileIconCode = defineComponent({
  name: "FileIconCode",
  render() {
    return (
      <svg
        class="icon"
        width="200px"
        height="200.00px"
        viewBox="0 0 1024 1024"
        version="1.1"
        xmlns="http://www.w3.org/2000/svg"
      >
        <path
          d="M145.6 0c-44.8 0-80 36.8-80 81.6v860.8c0 44.8 35.2 81.6 80 81.6h732.8c44.8 0 81.6-36.8 81.6-81.6V324.8L657.6 0h-512z"
          fill="#F7622C"
        />
        <path
          d="M960 326.4v16H755.2s-100.8-20.8-99.2-108.8c0 0 4.8 92.8 97.6 92.8H960z"
          fill="#F54921"
        />
        <path
          d="M657.6 0v233.6c0 25.6 17.6 92.8 97.6 92.8H960L657.6 0z"
          fill="#FFFFFF"
          opacity=".5"
        />
        <path
          d="M366.4 812.8h-4.8L240 758.4c-8-3.2-12.8-11.2-12.8-20.8 0-8 4.8-16 12.8-19.2l121.6-54.4c1.6 0 3.2-1.6 4.8-1.6 8 0 14.4 6.4 14.4 14.4 0 6.4-3.2 11.2-8 14.4l-112 48 112 46.4c4.8 3.2 8 8 8 14.4 0 8-6.4 12.8-14.4 12.8z m136-176L432 849.6c-3.2 6.4-8 9.6-14.4 9.6-9.6 0-16-6.4-16-14.4 0-1.6 1.6-3.2 1.6-4.8l70.4-211.2c3.2-6.4 8-11.2 14.4-11.2 9.6 0 14.4 6.4 14.4 14.4v4.8z m163.2 121.6L544 812.8h-4.8c-8 0-14.4-4.8-14.4-12.8 0-6.4 3.2-11.2 8-14.4l113.6-46.4-113.6-48c-4.8-3.2-8-8-8-14.4 0-8 6.4-14.4 14.4-14.4 1.6 0 3.2 1.6 4.8 1.6l121.6 54.4c8 3.2 12.8 11.2 12.8 19.2 0 9.6-4.8 17.6-12.8 20.8z"
          fill="#FFFFFF"
        />
      </svg>
    );
  }
});

// 图片文件
const FileIconImg = defineComponent({
  name: "FileIconImg",
  render() {
    return (
      <svg
        class="icon"
        width="200px"
        height="200.00px"
        viewBox="0 0 1024 1024"
        version="1.1"
        xmlns="http://www.w3.org/2000/svg"
      >
        <path
          d="M145.6 0c-44.8 0-80 36.8-80 81.6V944c0 44.8 35.2 80 80 80h732.8c44.8 0 81.6-35.2 81.6-80V326.4L657.6 0h-512z"
          fill="#49C9A7"
        />
        <path
          d="M960 326.4v16H755.2s-100.8-20.8-99.2-108.8c0 0 4.8 92.8 97.6 92.8H960z"
          fill="#37BB91"
        />
        <path
          d="M657.6 0v233.6c0 25.6 17.6 92.8 97.6 92.8H960L657.6 0z"
          fill="#FFFFFF"
          opacity=".5"
        />
        <path
          d="M225.6 859.2V524.8H560v334.4H225.6z m300.8-300.8H259.2v201.6h267.2V558.4z m-153.6 134.4l62.4-84.8 20.8 33.6 20.8-6.4 16 89.6H283.2l56-52.8 33.6 20.8z m-60.8-59.2c-14.4 0-27.2-9.6-27.2-24 0-12.8 12.8-24 27.2-24 14.4 0 25.6 11.2 25.6 24 0 14.4-11.2 24-25.6 24z"
          fill="#FFFFFF"
        />
      </svg>
    );
  }
});

// mp4
const FileIconMp4 = defineComponent({
  name: "FileIconMp4",
  render() {
    return (
      <svg
        class="icon"
        width="200px"
        height="200.00px"
        viewBox="0 0 1024 1024"
        version="1.1"
        xmlns="http://www.w3.org/2000/svg"
      >
        <path
          d="M145.6 0C100.8 0 64 36.8 64 81.6v860.8C64 987.2 100.8 1024 145.6 1024h732.8c44.8 0 81.6-36.8 81.6-81.6V324.8L657.6 0h-512z"
          fill="#9B64B2"
        />
        <path
          d="M960 326.4v16H755.2s-100.8-20.8-99.2-108.8c0 0 4.8 92.8 97.6 92.8H960z"
          fill="#824B9E"
        />
        <path
          d="M657.6 0v233.6c0 25.6 17.6 92.8 97.6 92.8H960L657.6 0z"
          fill="#FFFFFF"
          opacity=".5"
        />
        <path
          d="M401.6 862.4c-6.4 0-11.2-4.8-11.2-12.8v-147.2l-64 155.2c-1.6 3.2-3.2 4.8-6.4 4.8s-4.8-1.6-6.4-4.8l-64-155.2v147.2c0 8-4.8 12.8-11.2 12.8-6.4 0-12.8-4.8-12.8-12.8V686.4c0-11.2 9.6-19.2 20.8-19.2 8 0 16 4.8 19.2 11.2l54.4 134.4 56-134.4c3.2-6.4 9.6-11.2 17.6-11.2 11.2 0 20.8 8 20.8 19.2v163.2c0 8-4.8 12.8-12.8 12.8zM544 784h-54.4v65.6c0 8-4.8 12.8-11.2 12.8-6.4 0-12.8-4.8-12.8-12.8V684.8c0-9.6 8-16 17.6-16H544c38.4 0 59.2 25.6 59.2 57.6 0 30.4-22.4 57.6-59.2 57.6z m-3.2-94.4h-51.2v73.6h51.2c22.4 0 38.4-16 38.4-36.8 0-22.4-16-36.8-38.4-36.8z m222.4 121.6h-19.2v38.4c0 8-4.8 12.8-11.2 12.8-6.4 0-12.8-4.8-12.8-12.8v-38.4h-80c-6.4 0-12.8-4.8-12.8-12.8 0-1.6 1.6-4.8 3.2-8l76.8-115.2c3.2-4.8 9.6-8 17.6-8 9.6 0 19.2 8 19.2 19.2v104h19.2c4.8 0 9.6 4.8 9.6 11.2 0 4.8-4.8 9.6-9.6 9.6zM720 689.6l-67.2 100.8H720v-100.8z"
          fill="#FFFFFF"
        />
      </svg>
    );
  }
});
// 视频
const FileIconVideo = defineComponent({
  name: "FileIconVideo",
  render() {
    return (
      <svg
        class="icon"
        width="200px"
        height="200.00px"
        viewBox="0 0 1024 1024"
        version="1.1"
        xmlns="http://www.w3.org/2000/svg"
      >
        <path
          d="M147.2 0C102.4 0 65.6 36.8 65.6 81.6v860.8c0 44.8 36.8 81.6 81.6 81.6h731.2c44.8 0 81.6-36.8 81.6-81.6V324.8L657.6 0H147.2z"
          fill="#8E4C9E"
        />
        <path
          d="M960 326.4v16H755.2s-100.8-20.8-99.2-108.8c0 0 4.8 92.8 97.6 92.8H960z"
          fill="#713985"
        />
        <path
          d="M657.6 0v233.6c0 25.6 17.6 92.8 97.6 92.8H960L657.6 0z"
          fill="#FFFFFF"
          opacity=".5"
        />
        <path
          d="M456 728c0 6.4-1.6 12.8-6.4 16-3.2 3.2-84.8 70.4-190.4 113.6-1.6 1.6-4.8 1.6-8 1.6s-6.4-1.6-9.6-3.2c-6.4-3.2-9.6-8-11.2-16 0-1.6-4.8-54.4-4.8-112s4.8-108.8 4.8-112c1.6-6.4 4.8-11.2 11.2-16 3.2-1.6 6.4-3.2 9.6-3.2 3.2 0 6.4 1.6 8 3.2 105.6 41.6 187.2 110.4 190.4 113.6 4.8 3.2 6.4 9.6 6.4 14.4z"
          fill="#FFFFFF"
        />
      </svg>
    );
  }
});

// zip
const FileIconZip = defineComponent({
  name: "FileIconZip",
  render() {
    return (
      <svg
        class="icon"
        width="200px"
        height="200.00px"
        viewBox="0 0 1024 1024"
        version="1.1"
        xmlns="http://www.w3.org/2000/svg"
      >
        <path
          d="M145.6 0C100.8 0 64 35.2 64 80v862.4C64 987.2 100.8 1024 145.6 1024h732.8c44.8 0 81.6-36.8 81.6-81.6V324.8L657.6 0h-512z"
          fill="#8199AF"
        />
        <path
          d="M960 326.4v16H755.2s-100.8-20.8-99.2-108.8c0 0 4.8 92.8 97.6 92.8H960z"
          fill="#617F9B"
        />
        <path
          d="M657.6 0v233.6c0 25.6 17.6 92.8 97.6 92.8H960L657.6 0z"
          fill="#FFFFFF"
          opacity=".5"
        />
        <path
          d="M358.4 862.4h-120c-6.4 0-12.8-4.8-12.8-12.8 0-3.2 1.6-6.4 3.2-8l105.6-150.4h-99.2c-4.8 0-9.6-4.8-9.6-11.2 0-4.8 4.8-9.6 9.6-9.6h120c6.4 0 11.2 4.8 11.2 12.8 0 3.2 0 6.4-1.6 8l-107.2 150.4h100.8c6.4 0 11.2 4.8 11.2 9.6 0 6.4-4.8 11.2-11.2 11.2z m64 1.6c-6.4 0-11.2-4.8-11.2-11.2V680c0-6.4 4.8-11.2 12.8-11.2 6.4 0 11.2 4.8 11.2 11.2v172.8c0 6.4-4.8 11.2-12.8 11.2z m142.4-78.4H512v67.2c0 6.4-6.4 11.2-12.8 11.2s-11.2-4.8-11.2-11.2V688c0-9.6 6.4-17.6 16-17.6h60.8c38.4 0 60.8 27.2 60.8 57.6s-22.4 57.6-60.8 57.6z m-3.2-94.4H512v73.6h49.6c22.4 0 38.4-14.4 38.4-36.8 0-20.8-16-36.8-38.4-36.8z"
          fill="#FFFFFF"
        />
      </svg>
    );
  }
});

// keynote
const FileIconKeynote = defineComponent({
  name: "FileIconKeynote",
  render() {
    return (
      <svg
        class="icon"
        width="200px"
        height="200.00px"
        viewBox="0 0 1024 1024"
        version="1.1"
        xmlns="http://www.w3.org/2000/svg"
      >
        <path
          d="M145.6 0c-44.8 0-80 36.8-80 81.6v860.8c0 44.8 35.2 81.6 80 81.6h732.8c44.8 0 81.6-36.8 81.6-81.6V324.8L657.6 0h-512z"
          fill="#DB7A2A"
        />
        <path
          d="M960 326.4v16H755.2s-100.8-20.8-99.2-108.8c0 0 4.8 92.8 97.6 92.8H960z"
          fill="#D25B1F"
        />
        <path
          d="M657.6 0v233.6c0 25.6 17.6 92.8 97.6 92.8H960L657.6 0z"
          fill="#FFFFFF"
          opacity=".5"
        />
        <path
          d="M348.8 864c-3.2 0-6.4-1.6-8-3.2l-70.4-84.8-20.8 22.4v54.4c0 6.4-4.8 11.2-11.2 11.2-6.4 0-12.8-4.8-12.8-11.2V680c0-6.4 6.4-11.2 12.8-11.2s11.2 4.8 11.2 11.2v89.6l83.2-97.6c3.2-1.6 6.4-3.2 8-3.2 6.4 0 12.8 4.8 12.8 11.2 0 1.6-1.6 4.8-3.2 6.4l-65.6 75.2 73.6 84.8c1.6 1.6 1.6 3.2 1.6 6.4 0 4.8-4.8 11.2-11.2 11.2z m174.4-1.6h-99.2c-9.6 0-17.6-8-17.6-17.6V688c0-9.6 8-17.6 17.6-17.6h99.2c6.4 0 11.2 4.8 11.2 11.2 0 4.8-4.8 9.6-11.2 9.6h-92.8v62.4h91.2c6.4 0 11.2 4.8 11.2 11.2 0 4.8-4.8 9.6-11.2 9.6h-91.2v67.2h92.8c6.4 0 11.2 3.2 11.2 9.6 0 6.4-4.8 11.2-11.2 11.2z m198.4-176l-64 94.4v72c0 6.4-4.8 11.2-12.8 11.2-6.4 0-11.2-4.8-11.2-11.2v-72l-65.6-94.4c0-1.6-1.6-4.8-1.6-6.4 0-6.4 4.8-11.2 11.2-11.2 4.8 0 8 1.6 11.2 4.8l56 86.4 57.6-86.4c1.6-3.2 6.4-4.8 9.6-4.8 6.4 0 11.2 4.8 11.2 11.2 0 1.6 0 4.8-1.6 6.4z"
          fill="#FFFFFF"
        />
      </svg>
    );
  }
});

// Pages
const FileIconPages = defineComponent({
  name: "FileIconPages",
  render() {
    return (
      <svg
        class="icon"
        width="200px"
        height="200.00px"
        viewBox="0 0 1024 1024"
        version="1.1"
        xmlns="http://www.w3.org/2000/svg"
      >
        <path
          d="M145.6 0C100.8 0 64 36.8 64 81.6v860.8C64 987.2 100.8 1024 145.6 1024h732.8c44.8 0 81.6-36.8 81.6-81.6V324.8L657.6 0h-512z"
          fill="#6A6AE2"
        />
        <path
          d="M960 326.4v16H755.2s-100.8-20.8-99.2-108.8c0 0 4.8 92.8 97.6 92.8H960z"
          fill="#4F4FDA"
        />
        <path
          d="M657.6 0v233.6c0 25.6 17.6 92.8 97.6 92.8H960L657.6 0z"
          fill="#FFFFFF"
          opacity=".5"
        />
        <path
          d="M304 784h-54.4v65.6c0 8-4.8 12.8-11.2 12.8-6.4 0-12.8-4.8-12.8-12.8V684.8c0-8 8-16 17.6-16H304c38.4 0 59.2 25.6 59.2 57.6S340.8 784 304 784z m-3.2-94.4h-51.2v73.6h51.2c22.4 0 38.4-16 38.4-36.8s-16-36.8-38.4-36.8z m192 174.4c-54.4 0-97.6-40-97.6-99.2s43.2-99.2 97.6-99.2c28.8 0 51.2 11.2 67.2 25.6 1.6 1.6 3.2 4.8 3.2 8 0 6.4-4.8 11.2-11.2 11.2-3.2 0-6.4-1.6-8-3.2-12.8-12.8-32-20.8-51.2-20.8-41.6 0-73.6 32-73.6 78.4 0 44.8 32 78.4 73.6 78.4 24 0 43.2-11.2 52.8-20.8v-40h-57.6c-6.4 0-11.2-4.8-11.2-11.2 0-4.8 4.8-9.6 11.2-9.6h64c9.6 0 17.6 8 17.6 17.6v38.4c0 28.8-41.6 46.4-76.8 46.4z m184 0c-28.8 0-51.2-9.6-67.2-24-3.2-1.6-3.2-4.8-3.2-8 0-6.4 3.2-12.8 11.2-12.8 1.6 0 4.8 0 6.4 1.6 12.8 12.8 32 22.4 54.4 22.4 33.6 0 44.8-19.2 44.8-33.6 0-49.6-113.6-22.4-113.6-91.2 0-32 28.8-52.8 65.6-52.8 25.6 0 46.4 8 62.4 20.8 1.6 1.6 3.2 4.8 3.2 8 0 6.4-4.8 11.2-11.2 11.2-1.6 0-4.8 0-6.4-1.6-14.4-12.8-32-17.6-49.6-17.6-22.4 0-40 12.8-40 30.4 0 43.2 113.6 19.2 113.6 91.2 0 27.2-17.6 56-70.4 56z"
          fill="#FFFFFF"
        />
      </svg>
    );
  }
});

// pdf
const FileIconPdf = defineComponent({
  name: "FileIconPdf",
  render() {
    return (
      <svg
        class="icon"
        width="200px"
        height="200.00px"
        viewBox="0 0 1024 1024"
        version="1.1"
        xmlns="http://www.w3.org/2000/svg"
      >
        <path
          d="M145.6 0C100.8 0 64 36.8 64 81.6v860.8C64 987.2 100.8 1024 145.6 1024h732.8c44.8 0 81.6-36.8 81.6-81.6V324.8L657.6 0h-512z"
          fill="#8C181A"
        />
        <path
          d="M960 326.4v16H755.2s-100.8-20.8-97.6-107.2c0 0 3.2 91.2 96 91.2H960z"
          fill="#6B0D12"
        />
        <path
          d="M657.6 0v233.6c0 27.2 17.6 92.8 97.6 92.8H960L657.6 0z"
          fill="#FFFFFF"
          opacity=".5"
        />
        <path
          d="M302.4 784h-52.8v65.6c0 6.4-4.8 11.2-12.8 11.2-6.4 0-11.2-4.8-11.2-11.2V686.4c0-9.6 8-17.6 17.6-17.6h59.2c38.4 0 60.8 27.2 60.8 57.6 0 32-22.4 57.6-60.8 57.6z m-1.6-94.4h-51.2v73.6h51.2c22.4 0 38.4-14.4 38.4-36.8s-16-36.8-38.4-36.8z m166.4 171.2h-48c-9.6 0-17.6-8-17.6-17.6v-156.8c0-9.6 8-17.6 17.6-17.6h48c59.2 0 99.2 41.6 99.2 96s-38.4 96-99.2 96z m0-171.2h-41.6v148.8h41.6c46.4 0 73.6-33.6 73.6-75.2 1.6-40-25.6-73.6-73.6-73.6z m260.8 0h-92.8V752h91.2c6.4 0 9.6 4.8 9.6 11.2s-4.8 9.6-9.6 9.6h-91.2v76.8c0 6.4-4.8 11.2-12.8 11.2-6.4 0-11.2-4.8-11.2-11.2V686.4c0-9.6 8-17.6 17.6-17.6h99.2c6.4 0 9.6 4.8 9.6 11.2 1.6 4.8-3.2 9.6-9.6 9.6z"
          fill="#FFFFFF"
        />
      </svg>
    );
  }
});

// ppt
const FileIconPPT = defineComponent({
  name: "FileIconPPT",
  render() {
    return (
      <svg
        class="icon"
        width="200px"
        height="200.00px"
        viewBox="0 0 1024 1024"
        version="1.1"
        xmlns="http://www.w3.org/2000/svg"
      >
        <path
          d="M145.6 0C100.8 0 64 36.8 64 81.6v860.8C64 987.2 100.8 1024 145.6 1024h732.8c44.8 0 81.6-36.8 81.6-81.6V324.8L657.6 0h-512z"
          fill="#E34221"
        />
        <path
          d="M960 326.4v16H755.2s-100.8-20.8-99.2-108.8c0 0 4.8 92.8 97.6 92.8H960z"
          fill="#DC3119"
        />
        <path
          d="M657.6 0v233.6c0 25.6 17.6 92.8 97.6 92.8H960L657.6 0z"
          fill="#FFFFFF"
          opacity=".5"
        />
        <path
          d="M304 784h-54.4v67.2c0 6.4-4.8 11.2-11.2 11.2-6.4 0-12.8-4.8-12.8-11.2V686.4c0-9.6 8-17.6 17.6-17.6H304c38.4 0 59.2 25.6 59.2 57.6S340.8 784 304 784z m-3.2-94.4h-51.2v73.6h51.2c22.4 0 38.4-16 38.4-36.8 0-22.4-16-36.8-38.4-36.8zM480 784h-54.4v67.2c0 6.4-4.8 11.2-11.2 11.2-6.4 0-11.2-4.8-11.2-11.2V686.4c0-9.6 6.4-17.6 16-17.6H480c38.4 0 59.2 25.6 59.2 57.6S518.4 784 480 784z m-3.2-94.4h-49.6v73.6h49.6c22.4 0 38.4-16 38.4-36.8 0-22.4-16-36.8-38.4-36.8z m225.6 0h-52.8v161.6c0 6.4-4.8 11.2-11.2 11.2-6.4 0-12.8-4.8-12.8-11.2V689.6h-51.2c-6.4 0-11.2-4.8-11.2-11.2 0-4.8 4.8-9.6 11.2-9.6h128c6.4 0 11.2 4.8 11.2 11.2 0 4.8-4.8 9.6-11.2 9.6z"
          fill="#FFFFFF"
        />
      </svg>
    );
  }
});

// psd
const FileIconPSD = defineComponent({
  name: "FileIconPSD",
  render() {
    return (
      <svg
        class="icon"
        width="200px"
        height="200.00px"
        viewBox="0 0 1024 1024"
        version="1.1"
        xmlns="http://www.w3.org/2000/svg"
      >
        <path
          d="M145.6 1.6C100.8 1.6 64 36.8 64 81.6V944c0 44.8 36.8 80 81.6 80h732.8c44.8 0 81.6-35.2 81.6-80V326.4L657.6 1.6h-512z"
          fill="#0C77C6"
        />
        <path
          d="M960 326.4v16H755.2s-100.8-20.8-99.2-108.8c0 0 4.8 92.8 97.6 92.8H960z"
          fill="#0959B7"
        />
        <path
          d="M657.6 0v233.6c0 25.6 17.6 92.8 97.6 92.8H960L657.6 0z"
          fill="#FFFFFF"
          opacity=".5"
        />
        <path
          d="M304 784h-54.4v67.2c0 6.4-4.8 11.2-11.2 11.2-6.4 0-12.8-4.8-12.8-11.2V686.4c0-9.6 8-17.6 17.6-17.6H304c38.4 0 59.2 25.6 59.2 57.6S340.8 784 304 784z m-3.2-94.4h-51.2v73.6h51.2c22.4 0 38.4-16 38.4-36.8 0-22.4-16-36.8-38.4-36.8zM464 864c-28.8 0-51.2-9.6-67.2-24-1.6-1.6-3.2-4.8-3.2-8 0-6.4 4.8-12.8 11.2-12.8 1.6 0 4.8 0 6.4 3.2 12.8 11.2 32 20.8 54.4 20.8 33.6 0 44.8-19.2 44.8-33.6 0-49.6-113.6-22.4-113.6-91.2 0-32 28.8-52.8 65.6-52.8 25.6 0 46.4 8 62.4 20.8 1.6 1.6 3.2 4.8 3.2 8 0 6.4-4.8 11.2-11.2 11.2-1.6 0-4.8 0-6.4-1.6-14.4-12.8-32-17.6-49.6-17.6-22.4 0-40 12.8-40 30.4 0 43.2 115.2 19.2 115.2 91.2 0 27.2-19.2 56-72 56z m179.2-3.2h-48c-9.6 0-17.6-8-17.6-17.6v-156.8c0-9.6 8-17.6 17.6-17.6h48c60.8 0 99.2 41.6 99.2 96s-38.4 96-99.2 96z m0-171.2h-41.6v150.4h41.6c48 0 75.2-33.6 75.2-75.2s-27.2-75.2-75.2-75.2z"
          fill="#FFFFFF"
        />
      </svg>
    );
  }
});

// txt
const FileIconTxt = defineComponent({
  name: "FileIconTxt",
  render() {
    return (
      <svg
        class="icon"
        width="200px"
        height="200.00px"
        viewBox="0 0 1024 1024"
        version="1.1"
        xmlns="http://www.w3.org/2000/svg"
      >
        <path
          d="M147.2 0C102.4 0 65.6 35.2 65.6 80v862.4c0 44.8 35.2 81.6 81.6 81.6h731.2c44.8 0 81.6-36.8 81.6-81.6V324.8L657.6 0H147.2z"
          fill="#F9CA06"
        />
        <path
          d="M960 324.8v16H755.2s-100.8-19.2-97.6-107.2c0 0 3.2 91.2 96 91.2H960z"
          fill="#F7BC04"
        />
        <path
          d="M657.6 0v232c0 27.2 17.6 92.8 97.6 92.8H960L657.6 0z"
          fill="#FFFFFF"
          opacity=".5"
        />
        <path
          d="M364.8 688h-52.8v161.6c0 6.4-4.8 11.2-12.8 11.2-6.4 0-11.2-4.8-11.2-11.2V688h-52.8c-4.8 0-9.6-3.2-9.6-9.6 0-6.4 4.8-11.2 9.6-11.2h129.6c4.8 0 9.6 4.8 9.6 11.2 0 6.4-4.8 9.6-9.6 9.6z m187.2 172.8c-4.8 0-8 0-9.6-3.2l-59.2-80-60.8 80c-1.6 3.2-4.8 3.2-8 3.2-6.4 0-11.2-4.8-11.2-11.2 0-1.6 0-4.8 1.6-6.4l62.4-81.6-57.6-78.4c-1.6-1.6-1.6-3.2-1.6-6.4 0-4.8 3.2-11.2 11.2-11.2 3.2 0 6.4 1.6 9.6 4.8l54.4 73.6 54.4-73.6c3.2-3.2 6.4-4.8 9.6-4.8 6.4 0 11.2 4.8 11.2 11.2 0 3.2 0 4.8-1.6 6.4l-57.6 76.8 62.4 83.2c0 1.6 1.6 4.8 1.6 6.4 0 6.4-4.8 11.2-11.2 11.2zM731.2 688h-52.8v161.6c0 6.4-4.8 11.2-12.8 11.2-6.4 0-11.2-4.8-11.2-11.2V688h-52.8c-4.8 0-9.6-3.2-9.6-9.6 0-6.4 4.8-11.2 9.6-11.2h129.6c4.8 0 9.6 4.8 9.6 11.2 0 6.4-4.8 9.6-9.6 9.6z"
          fill="#FFFFFF"
        />
      </svg>
    );
  }
});

// unknown
const FileIconUnknown = defineComponent({
  name: "FileIconUnknown",
  render() {
    return (
      <svg
        class="icon"
        width="200px"
        height="200.00px"
        viewBox="0 0 1024 1024"
        version="1.1"
        xmlns="http://www.w3.org/2000/svg"
      >
        <path
          d="M145.6 0C100.8 0 64 36.8 64 81.6v860.8C64 987.2 100.8 1024 145.6 1024h732.8c44.8 0 81.6-36.8 81.6-81.6V324.8L657.6 0h-512z"
          fill="#8199AF"
        />
        <path
          d="M960 326.4v16H755.2s-100.8-20.8-99.2-108.8c0 0 4.8 92.8 97.6 92.8H960z"
          fill="#617F9B"
        />
        <path
          d="M657.6 0v233.6c0 25.6 17.6 92.8 97.6 92.8H960L657.6 0z"
          fill="#FFFFFF"
          opacity=".5"
        />
      </svg>
    );
  }
});

// doc
const FileIconDoc = defineComponent({
  name: "FileIconDoc",
  render() {
    return (
      <svg
        class="icon"
        width="200px"
        height="200.00px"
        viewBox="0 0 1024 1024"
        version="1.1"
        xmlns="http://www.w3.org/2000/svg"
      >
        <path
          d="M145.6 0C100.8 0 64 35.2 64 80v862.4C64 987.2 100.8 1024 145.6 1024h732.8c44.8 0 81.6-36.8 81.6-81.6V324.8L657.6 0h-512z"
          fill="#14A9DA"
        />
        <path
          d="M960 326.4v16H755.2s-100.8-20.8-99.2-108.8c0 0 4.8 92.8 97.6 92.8H960z"
          fill="#0F93D0"
        />
        <path
          d="M657.6 0v233.6c0 25.6 17.6 92.8 97.6 92.8H960L657.6 0z"
          fill="#FFFFFF"
          opacity=".5"
        />
        <path
          d="M291.2 862.4h-48c-9.6 0-17.6-8-17.6-17.6v-158.4c0-9.6 8-16 17.6-16h48c60.8 0 99.2 41.6 99.2 96s-38.4 96-99.2 96z m0-171.2h-41.6v148.8h41.6c48 0 75.2-33.6 75.2-73.6 0-41.6-27.2-75.2-75.2-75.2z m232 174.4c-57.6 0-96-43.2-96-99.2s38.4-99.2 96-99.2c56 0 94.4 41.6 94.4 99.2 0 56-38.4 99.2-94.4 99.2z m0-177.6c-43.2 0-70.4 33.6-70.4 78.4 0 44.8 27.2 76.8 70.4 76.8 41.6 0 70.4-32 70.4-76.8S564.8 688 523.2 688z m294.4 6.4c1.6 1.6 3.2 4.8 3.2 8 0 6.4-4.8 11.2-11.2 11.2-3.2 0-6.4-1.6-8-3.2-11.2-14.4-30.4-22.4-48-22.4-41.6 0-73.6 32-73.6 78.4 0 44.8 32 76.8 73.6 76.8 17.6 0 35.2-6.4 48-20.8 1.6-3.2 4.8-4.8 8-4.8 6.4 0 11.2 6.4 11.2 12.8 0 3.2-1.6 4.8-3.2 8-14.4 16-35.2 27.2-64 27.2-56 0-99.2-40-99.2-99.2s43.2-99.2 99.2-99.2c28.8 0 49.6 11.2 64 27.2z"
          fill="#FFFFFF"
        />
      </svg>
    );
  }
});

// xml
const FileIconXML = defineComponent({
  name: "FileIconXML",
  render() {
    return (
      <svg
        class="icon"
        width="200px"
        height="200.00px"
        viewBox="0 0 1024 1024"
        version="1.1"
        xmlns="http://www.w3.org/2000/svg"
      >
        <path
          d="M145.6 0C100.8 0 64 35.2 64 80v862.4C64 987.2 100.8 1024 145.6 1024h732.8c44.8 0 81.6-36.8 81.6-81.6V324.8L657.6 0h-512z"
          fill="#FC7B24"
        />
        <path
          d="M960 326.4v16H755.2s-100.8-20.8-99.2-108.8c0 0 4.8 92.8 97.6 92.8H960z"
          fill="#FB5C1B"
        />
        <path
          d="M657.6 0v233.6c0 25.6 17.6 92.8 97.6 92.8H960L657.6 0z"
          fill="#FFFFFF"
          opacity=".5"
        />
        <path
          d="M374.4 860.8c-3.2 0-6.4 0-9.6-3.2l-59.2-80-59.2 80c-3.2 3.2-6.4 3.2-9.6 3.2-6.4 0-11.2-4.8-11.2-11.2 0-1.6 0-4.8 1.6-6.4l62.4-81.6-57.6-78.4c-1.6-1.6-1.6-3.2-1.6-6.4 0-4.8 4.8-11.2 11.2-11.2 3.2 0 6.4 1.6 9.6 4.8l54.4 73.6 54.4-73.6c3.2-3.2 6.4-4.8 9.6-4.8 6.4 0 11.2 4.8 11.2 11.2 0 3.2 0 4.8-1.6 6.4l-57.6 76.8 62.4 83.2c1.6 1.6 1.6 4.8 1.6 6.4 0 6.4-4.8 11.2-11.2 11.2z m230.4 0c-6.4 0-11.2-4.8-11.2-11.2v-148.8l-64 156.8c-1.6 1.6-3.2 3.2-6.4 3.2s-4.8-1.6-6.4-3.2l-64-156.8v148.8c0 6.4-4.8 11.2-11.2 11.2-8 0-12.8-4.8-12.8-11.2V684.8c0-9.6 9.6-19.2 20.8-19.2 8 0 16 4.8 19.2 12.8l54.4 134.4 54.4-134.4c3.2-8 11.2-12.8 19.2-12.8 11.2 0 20.8 9.6 20.8 19.2v164.8c0 6.4-4.8 11.2-12.8 11.2z m169.6-1.6h-88c-9.6 0-17.6-8-17.6-17.6V676.8c0-6.4 6.4-11.2 12.8-11.2s11.2 4.8 11.2 11.2v161.6h81.6c4.8 0 9.6 4.8 9.6 9.6 0 6.4-4.8 11.2-9.6 11.2z"
          fill="#FFFFFF"
        />
      </svg>
    );
  }
});

const Category = {
  audioExt: ["mp3", "wav", "aac", "flac", "ogg", "ape", "m4a", "wma"],
  videoExt: ["mp4", "avi", "mkv", "rmvb", "mov", "wmv", "flv", "3gp"],
  imgExt: ["jpg", "jpeg", "png", "gif", "bmp", "webp", "svg", "psd", "ai"],
  codeExt: [
    "js",
    "ts",
    "html",
    "css",
    "java",
    "py",
    "php",
    "go",
    "rb",
    "swift",
    "dart"
  ],
  isAudio(ext: string) {
    return this.audioExt.includes(ext);
  },

  isVideo(ext: string) {
    return this.videoExt.includes(ext);
  },

  isCode(ext: string) {
    return this.codeExt.includes(ext);
  },

  isImage(ext: string) {
    return this.imgExt.includes(ext);
  },
  extIs(ext: string, target: string): boolean {
    return target === ext;
  },
  getIcon(ext: string) {
    if (this.extIs(ext, "ai")) {
      return FileIconAI;
    } else if (this.extIs(ext, "csv")) {
      return FileIconCsv;
    } else if (this.extIs(ext, "xls") || this.extIs(ext, "xlsx")) {
      return FileIconExcel;
    } else if (this.extIs(ext, "exe")) {
      return FileIconExe;
    } else if (this.extIs(ext, "folder")) {
      return FileIconFolder;
    } else if (this.extIs(ext, "mp4")) {
      return FileIconMp4;
    } else if (this.extIs(ext, "zip")) {
      return FileIconZip;
    } else if (this.extIs(ext, "key")) {
      return FileIconKeynote;
    } else if (this.extIs(ext, "pages")) {
      return FileIconPages;
    } else if (this.extIs(ext, "pdf")) {
      return FileIconPdf;
    } else if (this.extIs(ext, "ppt") || this.extIs(ext, "pptx")) {
      return FileIconPPT;
    } else if (this.extIs(ext, "psd")) {
      return FileIconPSD;
    } else if (this.extIs(ext, "txt")) {
      return FileIconTxt;
    } else if (this.extIs(ext, "doc") || this.extIs(ext, "docx")) {
      return FileIconDoc;
    } else if (this.extIs(ext, "xml")) {
      return FileIconXML;
    } else if (this.isCode(ext)) {
      return FileIconCode;
    } else if (this.isAudio(ext)) {
      return FileIconAudio;
    } else if (this.isImage(ext)) {
      return FileIconImg;
    } else if (this.isVideo(ext)) {
      return FileIconVideo;
    } else {
      return FileIconUnknown;
    }
  }
};

export {
  FileIconAI,
  FileIconAudio,
  FileIconCsv,
  FileIconExcel,
  FileIconExe,
  FileIconFolder,
  FileIconCode,
  FileIconImg,
  FileIconMp4,
  FileIconVideo,
  FileIconZip,
  FileIconKeynote,
  FileIconPages,
  FileIconPdf,
  FileIconPPT,
  FileIconPSD,
  FileIconTxt,
  FileIconUnknown,
  FileIconDoc,
  FileIconXML,
  Category
};
